package com.kanshu.ksgb.fastread.doudou.module.bookcity.adapter;

import android.content.Context;

import com.dl7.recycler.adapter.BaseQuickAdapter;
import com.dl7.recycler.adapter.BaseViewHolder;
import com.kanshu.ksgb.fastread.doudou.R;
import com.kanshu.ksgb.fastread.doudou.common.imageloader.GlideImageLoader;
import com.kanshu.ksgb.fastread.doudou.common.business.commonbean.BookInfo;

import java.util.List;

/**
 * 专题全部适配器
 * Created by wcy on 18/5/25.
 */
public class TopicListAdapter extends BaseQuickAdapter<BookInfo> {
    public TopicListAdapter(Context context, List<BookInfo> data) {
        super(context, data);
    }

    @Override
    protected int attachLayoutRes() {
        return R.layout.item_topic_list_layout;
    }

    @Override
    protected void convert(BaseViewHolder holder, BookInfo item, int position) {
        GlideImageLoader.load(item.title_big_img, holder.getView(R.id.cover), GlideImageLoader.getEmptyConfig());
        holder.setText(R.id.title, item.title).setText(R.id.title_desc, item.title_desc);
    }
}
